package com.CST.mapper.dataplatform;

import com.CST.entity.cb.BdDepartment;
import com.CST.vo.cb.BdSysUserDeptCodeVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 核算科室 Mapper 接口
 * </p>
 *
 * @author ly
 * @since 2021-09-23
 */
@Mapper
@Repository
public interface BdDepartmentMapper extends BaseMapper<BdDepartment> {

    /**
     * 正常获取科室/部门数据
     * @param entity
     * @return
     */
    List<BdDepartment> getDepartmentSource(BdDepartment entity);

    /**
     * 获取科室/部门数据(组织架构)
     * @param entity
     * @return
     */
    List<BdDepartment> getDepartmentOrganization(BdDepartment entity);

    /**
     * 获取科室/部门数据(成本类)
     * @param entity
     * @return
     */
    List<BdDepartment> getCostDepartments(BdDepartment entity);

    /**
     * 添加科室/部门数据
     * @param entity
     * @return
     */
    void addDepartment(BdDepartment entity);

    /**
     * 修改科室/部门数据
     * @param entity
     * @return
     */
    void modifyDepartment(BdDepartment entity);
     List<BdSysUserDeptCodeVO>  getCostDepartment();
    List<BdSysUserDeptCodeVO>  getCostDepartmentXG();
    /**
     * 获取子集部门
     */
    List<BdDepartment> getChildrens(String DeptCode);
    List<BdDepartment>  getChildrenss(String DeptCode);
    /**
     * 获取成本最大部门号
     */
    String getMaxDeptCode(BdDepartment entity);


    List<BdDepartment> getPDepartment(String  DeptName,String DeptCode);

    List<BdDepartment> getDepartment(String  DeptName,String DeptCode);
}
